package com.cj.stock.controller;

import com.cj.common.response.Result;
import com.cj.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @Author cheng jun
 * @Description:
 * @Date 2021/7/25 17:49
 */
@Controller
@RequestMapping(value = "/stock")
public class StockController {

    @Autowired
    private StockService stockService;

    @RequestMapping(value = "/deleteStock", method = RequestMethod.POST)
    @ResponseBody
    public Result deleteStock(@RequestBody Map<String, Object> map) {
        return Result.success(stockService.deleteStock(map));
    }
}
